<!DOCTYPE html>
<html>

	<body>
		<img id="deng" onclick="myfun()" src="../../img/pic_bulboff.gif" width="100" height="180">
		<script>
			var element = document.getElementById('deng');

			function myfun() {

				if(element.src.indexOf('off') != -1) {
					element.src = "../../img/pic_bulbon.gif";
				} else {
					element.src = "../../img/pic_bulboff.gif";
				}
			}
		</script>

	</body>

</html>